var app = angular.module("myApp",['ngRoute']);

// var urlAddress = "http://localhost/children_watch";
// var urlAddress = "http://115.29.175.93/game/dumen";
// var urlAddress = "http://192.168.10.129/children_watch";
var urlAddress = "http://daxiongmao.oschina.io/childwatch"

// 公共组件控制器
app.controller('public',["$scope",function($scope){

  this.address = urlAddress;

  // nav 导航栏的控制
  $("nav .tit").on("click", function(){
     if(this.onoff) {
        this.onoff = false;
        $(this).parent().removeClass("hide");
     } else {
        this.onoff = true;
        $(this).parent().addClass("hide");
     }
  });
  $(".tap_class").on("click", function() {
     if(this.onoff) {
        this.onoff = false;
        $(this).parents(".nav_box").removeClass("hide_nav");
     } else {
        this.onoff = true;
        $(this).parents(".nav_box").addClass("hide_nav");
     }
     $(".mian").css({
        "paddingLeft": $(".nav_box").width() + "px"
     })
  });
}])